package com.xb.loan.cashier.service.bean;

import java.io.Serializable;
import java.lang.reflect.Field;

/**
 * 充值订单信息实体类
 */
public class ChargeOrderBO implements Serializable {
    private static final long serialVersionUID = -5525762678983481820L;
    
    private String orderId;                     //订单号
    private int payChannelType;                 //第三方支付渠道    1：支付宝；2：微信；3：银联
    private int tradeType;                      //渠道业务类型    1：web；2：wap；3：app
    private String remoteAddr;                  //用户IP地址   微信APP支付时必须传。支付宝和银联支付可以为空
    private String callBackUrl;                 //前台回调商户地址 如果不传会使用默认配置的回调地址
    private String platId;                      //平台id
    private String partnerId;                   //渠道id
    private String userId;                      //用户id
    private String loginName;                   //登录名
    private double money;                       //支付金额  保留两位小数
    private String title;                       //订单标题
    private String content;                     //方案内容
    private String accountPeriod;               //账期  业务系统账期，格式yyyyMMdd
    private String sign;                        //加密串 sign签名字段：money、platId、partnerId、userId、orderId、payChannelType、tradeType
    
    public String getOrderId() {
        return orderId;
    }
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
    public int getPayChannelType() {
        return payChannelType;
    }
    public void setPayChannelType(int payChannelType) {
        this.payChannelType = payChannelType;
    }
    public int getTradeType() {
        return tradeType;
    }
    public void setTradeType(int tradeType) {
        this.tradeType = tradeType;
    }
    public String getRemoteAddr() {
        return remoteAddr;
    }
    public void setRemoteAddr(String remoteAddr) {
        this.remoteAddr = remoteAddr;
    }
    public String getPlatId() {
        return platId;
    }
    public void setPlatId(String platId) {
        this.platId = platId;
    }
    public String getPartnerId() {
        return partnerId;
    }
    public void setPartnerId(String partnerId) {
        this.partnerId = partnerId;
    }
    public String getUserId() {
        return userId;
    }
    public void setUserId(String userId) {
        this.userId = userId;
    }
    public String getLoginName() {
        return loginName;
    }
    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }
    public double getMoney() {
        return money;
    }
    public void setMoney(double money) {
        this.money = money;
    }
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    public String getAccountPeriod() {
		return accountPeriod;
	}
	public void setAccountPeriod(String accountPeriod) {
		this.accountPeriod = accountPeriod;
	}
	public String getSign() {
        return sign;
    }
    public void setSign(String sign) {
        this.sign = sign;
    }
	public String getCallBackUrl() {
		return callBackUrl;
	}
	public void setCallBackUrl(String callBackUrl) {
		this.callBackUrl = callBackUrl;
	}
	
	@Override
	public String toString(){
		StringBuffer sb = new StringBuffer("");
		Class<ChargeOrderBO> c = ChargeOrderBO.class;
		Field[] fields = c.getDeclaredFields();
		for (Field field : fields) {
			field.setAccessible(true);
			try {
				Object o = field.get(this);
				if (o!=null) {
					sb.append(field.getName());
					sb.append("=");
					sb.append(o.toString());
					sb.append(",");
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		return sb.equals("")?"":sb.toString().replaceAll(",$", "");
	}
}
